/* 基础样式 */
* {
    margin: 0;
    padding: 0;
}

body {
    background: #deecf3;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 关键背景层样式 */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* 确保在内容层下方 */
    background-image: url('bg.png'); /* 背景图路径 */
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    
    /* 锁定宽高比（可选） */
    aspect-ratio: 16/9; /* 根据实际图片比例设置 */
    @supports not (aspect-ratio: 16/9) {
        /* 兼容旧浏览器的padding-top方式 */
        height: 0;
        padding-top: 56.25%; /* 16:9比例计算值 */
    }
}

/* GIF容器 */
.gif-wrapper {
    position: fixed;
    top: 30px;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

#gif-container {
    width: 85%; /* 屏幕宽度的90% */
    max-width: 400px; /* 最大宽度限制 */
    position:relative;
}

#gif-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px; /* 可选圆角 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* 可选阴影 */
}

/* 加载状态样式 */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    z-index: 1;
}

/* 保存弹窗 */
.dialog-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
}

.save-dialog {
    display: flex;
    width: 60vw;
    flex-direction: column;
    gap: 20px; /* 控制文字和按钮间距 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.dialog-btns {
    display: flex;
    gap: 15px; /* 按钮间距 */
    justify-content: center; /* 水平居中 */
    width: 100%;
}

.dialog-btn {
    padding: 10px 12px;
    margin: 0; /* 清除原有margin */
    max-width: 160px; /* 控制最大宽度 */
    border-style:none;
}

.save-btn {
    background: #07c160;
    color: white;
}

.cancel-btn {
    background: #f0f0f0;
    color: #333;
}
